<?php echo $this->partial('header.phtml', array('urlbase'=>$this->urlbase,'controller'=>$this->controller)); ?> 

<?php if($this->empresa_home['PGS_ID'] > 0) { ?>
<!-- Banner -->
<section id="banner">
    <div class="wrapper style2">

        <article id="main" class="container special">
            <header>
                <h2><?php echo $this->empresa_home['PGS_NOM']; ?></h2>
            </header>
            <?php echo $this->empresa_home['PGS_TXT']; ?>
        </article>

    </div>
</section>
<?php } ?>

<?php if($this->servico_destaque['SER_ID'] > 0){
    $img = glob('public/upload/stservico/'.$this->servico_destaque['SER_ID'].'_dtq.*');
    $img = $img[0];
    $link = $this->urlbase.'/servicos/index/id/'.$this->servico_destaque['SER_ID'];
?>
<!-- Main -->
<div class="wrapper style2">

    <article id="main" class="container special">
        <a href="<?php echo $link; ?>" class="image featured">
            <img src="<?php echo $this->urlbase.'/'.$img; ?>" alt="<?php echo $this->servico_destaque['SER_NOM']; ?>" />
        </a>
        <header>
            <h2><?php echo $this->servico_destaque['SER_NOM']; ?></h2>
            <p><?php echo $this->servico_destaque['SER_DSC']; ?></p>
        </header>
        <p><?php echo $this->servico_destaque['SER_TXTDTQ']; ?></p>
        <footer>
            <a href="<?php echo $link; ?>" class="button">Ver mais detalhes</a>
        </footer>
    </article>

</div>
<?php } ?>

<!-- Carousel -->
<section class="carousel">
    <div class="reel">
        
        <?php foreach($this->servicos as $servico){ 
            $img = glob('public/upload/stservico/'.$servico['SER_ID'].'_lst.*');
            $img = $img[0];
            $link = $this->urlbase.'/servicos/index/id/'.$servico['SER_ID'];
        ?>
        <article>
            <a href="<?php echo $link; ?>" class="image featured"><img src="<?php echo $this->urlbase.'/'.$img; ?>" alt="<?php echo $servico['SER_NOM']; ?>" /></a>
            <header>
                <h3><a href="<?php echo $link; ?>"><?php echo $servico['SER_NOM']; ?></a></h3>
            </header>
            <p><?php echo $servico['SER_DSC']; ?></p>							
        </article>
        <?php } ?>
    </div>
</section>

<div class="wrapper style1">

    <section id="features" class="container special">
        <header>
            <h2>Portfólio</h2>
            <p>Nossos últimos trabalhos realizados.</p>
        </header>
        <div class="row">
            <?php foreach($this->portfolio as $port){ 
                $img = glob('public/upload/stportfolio/'.$port['POR_ID'].'_lst.*');
                $img = $img[0];
                $link = $this->urlbase.'/portfolio/index/id/'.$port['POR_ID'];
            ?>
            <article class="4u special">
                <a href="<?php echo $link; ?>" class="image featured"><img src="<?php echo $this->urlbase.'/'.$img; ?>" alt="<?php echo $port['POR_NOM'];?>" /></a>
                <header>
                    <h3><a href="<?php echo $link; ?>"><?php echo $port['POR_NOM'];?></a></h3>
                </header>
                <p><?php echo $port['POR_DSC'];?></p>
            </article>
            <?php } ?>    
            
        </div>
    </section>

</div>

<div class="wrapper style1">

    <section id="features" class="container special">
        <header>
            <h2>Dicas de Beleza</h2>
            <p>Informações úteis para a sua beleza do dia-a-dia.</p>
        </header>
        <div class="row">
            <?php foreach($this->blog as $blog){ 
                $img = glob('public/upload/stblog/'.$blog['BLO_ID'].'_lst.*');
                $img = $img[0];
                $link = $this->urlbase.'/dicasdebeleza/index/id/'.$blog['BLO_ID'];
            ?>
            <article class="4u special">
                <a href="<?php echo $link; ?>" class="image featured"><img src="<?php echo $this->urlbase.'/'.$img; ?>" alt="<?php echo $blog['BLO_NOM'];?>" /></a>
                <header>
                    <h3><a href="<?php echo $link; ?>"><?php echo $blog['BLO_NOM'];?></a></h3>
                </header>
                <p><?php echo $blog['BLO_DSC'];?></p>
            </article>
            <?php } ?>  
        </div>
    </section>

</div>

<?php echo $this->partial('footer.phtml', array('urlbase'=>$this->urlbase)); ?> 